<html>
	<head>
		<title><%= h(yield(:title) || "AdminPage") %></title>
		<%= stylesheet_link_tag 'application' %>
		<%= yield(:head) %>
		<%= javascript_include_tag :defaults %>
		<%= active_scaffold_includes %>
	</head>
	<body>
		<div id="wrap">
			<div id="header">
				<!-- need to edit later -->
				<h1 id="logo-text">Junior Science Talent Project</h1>
				<h2 id="slogan">โครงการพัฒนาอัจฉริยภาพทางวิทยาศาสตร์สำหรับเด็กและเยาวชน</h2>
			</div>
			<div id="content-wrap">
				<div id="main">
					<% unless current_user.nil?%>
						Nav:
						<%= link_to "My Account", account_path %> |
						<%= link_to 'Edit Profile', edit_account_path %> |
						<%= link_to "find People", new_search_path %> |
						<%= link_to 'Admin Page', :controller => 'siteadmin/users' %>
					<%end%>
				</div>
				<div id="user_status">
					<% unless current_user.nil? %>
						Welcome <%=h current_user.login %>! Not you?
						<%= link_to "Log out", logout_path %>
					<% else %>
						<%= link_to "Sign up", signup_path %> or
						<%= link_to "log in", login_path %>.
					<% end %>
				</div>
				<br>
				<%- flash.each do |name, msg| -%>
					<%= content_tag :div, msg, :id => "flash_#{name}" %>
				<%- end -%>

				<%- if show_title? -%>
					<h1><%=h yield(:title) %></h1>
				<%- end -%>

				<%= yield %>
			</div>
			<div id="footer">
				<%= render :file => 'layouts/_footer.html.erb' %>
			</div>
		</div>
	</body>
</html>
